# -*- coding: utf-8 -*-
import scrapy

class BlogSpider(scrapy.Spider):
    name = 'blogspider'
    start_urls = ['https://www.upwork.com/i/job-categories/']

    def parse(self, response):
        for title in response.css('#jobs-list section'):
            yield {'title': title.css('a[itemprop="url"] ::text').extract_first()}

        for next_page in response.css('.container .plain-list li > a'):
            yield response.follow(next_page, self.parse)